Remove hardcoded styling and unused colors from DiffRenderer#8
Remove hardcoded styling and unused colors from DiffRenderer#8paololeonardi wants to merge 1 commit intotornikegomareli:mainfrom
Conversation
Drops fixed padding, the hardcoded ScrollView background, and the now-unused Color.appBackground / PlatformColors, letting consumers control spacing and background inheritance themselves.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (4)
📝 WalkthroughWalkthroughThe pull request removes the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Removes opinionated layout defaults baked into
DiffRendererso that consumers have full control over spacing and background appearance.Fixes dark-corner artifacts that appeared when the view was embedded in a grouped
Listin dark mode.Changes
.padding()fromDiffRenderer— callers apply it externallyColor.appBackgroundfrom theScrollViewbackground, letting the view inherit its container's backgroundPlatformColors.swiftand the now-unusedColor.appBackgroundextension, along with theimportreferences inDiffFileViewandDiffLineViewBreaking Changes
Consumers that relied on
DiffRenderer's built-in padding will need to add.padding()at the call site.Testing
Verified manually by embedding
DiffRendererin a groupedListin both light and dark mode — no background artifacts observed.Summary by CodeRabbit